package eiisan.reflect;

import java.util.Vector;

/**
 * TODO
 *
 * @author gragonfly
 * @date 2019/7/19
 **/
public class TestDemo {

    public static void main(String[] args) {
        class Foo{
            int i = 3;
        }
        Object o = new Foo();
        Foo foo = (Foo)o;
        System.out.println(foo.i);

        My2Vector v = new My2Vector(2);
        System.out.println(v.i);
        MyVector myVector = new MyVector(2);
        System.out.println(myVector.i);

    }

    public static class MyVector extends Vector{
        int i = 1;
//       public MyVector(){
//
//       }
        public  MyVector(int i) {
            this.i = 2;
        }
    }

    public static class My2Vector extends MyVector{
        public My2Vector(int i) {
            super(2);
            i = 4;
        }
    }
}
